package org.smile.validate.ann;

import org.smile.annotation.AliasFor;
import org.smile.validate.Field;
import org.smile.validate.ValidateType;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ElementType.METHOD,ElementType.ANNOTATION_TYPE,ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Field(type = ValidateType.email)
public @interface Email {
    /**字段名称*/
    @AliasFor(annotation = Field.class)
    String name() default "";
    /**不通过时字段名称提示语*/
    @AliasFor(annotation = Field.class)
    String text() default "";
    /**不通过时字段名称提示语国际化字符名称*/
    @AliasFor(annotation = Field.class)
    String key() default "";
    /**假如为空时*/
    @AliasFor(annotation = Field.class)
    public boolean ifnull() default true;
}
